package com.cy.reflection;

/**
 * 观察类的具体加载过程
 * java -verbose:class 
 * @author CY
 * @version 2014年9月9日
 */
public class DynamicLoadingDemo {

	//java -verbose:class 
	public static void main(String[] args) {
		new A();
		System.out.println("====================================");
		new B();
		
		new C();
		new C();
		
		new D();
		new D();
	}

}
class A {
	
}
class B {
	
}
class C {
	//静态语句块
	static {
		System.out.println("CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC");
	}
}
class D {
	//动态语句块
	{
		System.out.println("DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD");
	}
}